<?php

namespace common\models;

use Yii;
use common\components\behaviors\ImageBehavior;
/**
 * This is the model class for table "dh_banner".
 *
 * @property integer $id
 * @property integer $img_id
 * @property string $title
 */
class DhBanner extends \common\components\ActiveRecord2015
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'dh_banner';
    }
    public function behaviors() {
        return [
            'image' => [
                'class' => ImageBehavior::className()
            ]
        ];
    }
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [

            [['id', 'img_id'], 'integer'],
            [['title'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'img_id' => 'Img ID',
            'title' => 'Title',
        ];
    }
}
